<?php

namespace App\Http\Controllers\Admin\Logs;

use App\Http\Controllers\Controller as BaseController;
use App\Repository\Logs\LogsRepository;
use Illuminate\Http\Request;

// 操作日志
class IndexController extends BaseController
{
    private $repoist;

    public function __construct(LogsRepository $repository)
    {
        $this->repoist = $repository;
    }


    public function index(Request $request)
    {
        $tableId = 0;
        if ($request->has('id') && !empty($request->get('id'))) {
            $tableId = $request->get('id');
        }
        $type = 0;
        if ($request->has('type') && !empty($request->get('type'))) {
            $type = (int)$request->get('type');
        }
        return $this->repoist->dataList($type, $tableId, $request->get('pageNum'), $request->get('pageSize'));
    }
}
